package com.example.lj.uav.bean;

import android.os.Parcel;
import android.os.Parcelable;

public class RouteLine implements Parcelable {
    private int id;
    private String fileName;
    private double altitude;
    private double speed;
    private String actionOnFinish;
    private String headingMode;
    private String gimbalPitchMode;
    private String altitudeMode;
    private String coordinates;
    private long updateTime;
    private String updatePlace;
    private boolean checked;
    private int collected;
    private int fileNameCode;
    private String type;
    private String cameraType;
    private String direction;
    private String overlapH;
    private String overlapW;
    private String focalLength;
    private String sensorW;
    private String sensorH;
    private String margin;
    private String ImagePath;
    private int stopWhenLost;


    public RouteLine() {
    }

    public RouteLine(String fileName) {
        this.fileName = fileName;
    }

    protected RouteLine(Parcel in) {
        id = in.readInt();
        fileName = in.readString();
        altitude = in.readDouble();
        speed = in.readDouble();
        actionOnFinish = in.readString();
        headingMode = in.readString();
        gimbalPitchMode = in.readString();
        altitudeMode = in.readString();
        coordinates = in.readString();
        updateTime = in.readLong();
        updatePlace = in.readString();
        checked = in.readByte() != 0;
        collected = in.readInt();
        fileNameCode = in.readInt();
        type = in.readString();
        cameraType = in.readString();
        direction = in.readString();
        overlapH = in.readString();
        overlapW = in.readString();
        focalLength = in.readString();
        sensorW = in.readString();
        sensorH = in.readString();
        margin = in.readString();
        ImagePath = in.readString();
        stopWhenLost = in.readInt();
    }

    public static final Creator<RouteLine> CREATOR = new Creator<RouteLine>() {
        @Override
        public RouteLine createFromParcel(Parcel in) {
            return new RouteLine(in);
        }

        @Override
        public RouteLine[] newArray(int size) {
            return new RouteLine[size];
        }
    };

    public int getStopWhenLost() {
        return stopWhenLost;
    }

    public void setStopWhenLost(int stopWhenLost) {
        this.stopWhenLost = stopWhenLost;
    }

    public String getCameraType() {
        return cameraType;
    }

    public void setCameraType(String cameraType) {
        this.cameraType = cameraType;
    }

    public String getDirection() {
        return direction;
    }

    public void setDirection(String direction) {
        this.direction = direction;
    }

    public String getOverlapH() {
        return overlapH;
    }

    public void setOverlapH(String overlapH) {
        this.overlapH = overlapH;
    }

    public String getOverlapW() {
        return overlapW;
    }

    public void setOverlapW(String overlapW) {
        this.overlapW = overlapW;
    }

    public String getFocalLength() {
        return focalLength;
    }

    public void setFocalLength(String focalLength) {
        this.focalLength = focalLength;
    }

    public String getSensorW() {
        return sensorW;
    }

    public void setSensorW(String sensorW) {
        this.sensorW = sensorW;
    }

    public String getSensorH() {
        return sensorH;
    }

    public void setSensorH(String sensorH) {
        this.sensorH = sensorH;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getFileNameCode() {
        return fileNameCode;
    }

    public void setFileNameCode(int fileNameCode) {
        this.fileNameCode = fileNameCode;
    }

    public int getCollected() {
        return collected;
    }

    public void setCollected(int collected) {
        this.collected = collected;
    }

    public boolean isChecked() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked = checked;
    }

    public long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(long updateTime) {
        this.updateTime = updateTime;
    }

    public String getUpdatePlace() {
        return updatePlace;
    }

    public void setUpdatePlace(String updatePlace) {
        this.updatePlace = updatePlace;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public double getAltitude() {
        return altitude;
    }

    public void setAltitude(double altitude) {
        this.altitude = altitude;
    }

    public double getSpeed() {
        return speed;
    }

    public void setSpeed(double speed) {
        this.speed = speed;
    }

    public String getActionOnFinish() {
        return actionOnFinish;
    }

    public void setActionOnFinish(String actionOnFinish) {
        this.actionOnFinish = actionOnFinish;
    }

    public String getHeadingMode() {
        return headingMode;
    }

    public void setHeadingMode(String headingMode) {
        this.headingMode = headingMode;
    }

    public String getGimbalPitchMode() {
        return gimbalPitchMode;
    }

    public void setGimbalPitchMode(String gimbalPitchMode) {
        this.gimbalPitchMode = gimbalPitchMode;
    }

    public String getAltitudeMode() {
        return altitudeMode;
    }

    public void setAltitudeMode(String altitudeMode) {
        this.altitudeMode = altitudeMode;
    }

    public String getCoordinates() {
        return coordinates;
    }

    public void setCoordinates(String coordinates) {
        this.coordinates = coordinates;
    }

    public String getMargin() {
        return margin;
    }

    public void setMargin(String margin) {
        this.margin = margin;
    }

    public String getImagePath() {
        return ImagePath;
    }

    public void setImagePath(String imagePath) {
        ImagePath = imagePath;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeInt(id);
        parcel.writeString(fileName);
        parcel.writeDouble(altitude);
        parcel.writeDouble(speed);
        parcel.writeString(actionOnFinish);
        parcel.writeString(headingMode);
        parcel.writeString(gimbalPitchMode);
        parcel.writeString(altitudeMode);
        parcel.writeString(coordinates);
        parcel.writeLong(updateTime);
        parcel.writeString(updatePlace);
        parcel.writeByte((byte) (checked ? 1 : 0));
        parcel.writeInt(collected);
        parcel.writeInt(fileNameCode);
        parcel.writeString(type);
        parcel.writeString(cameraType);
        parcel.writeString(direction);
        parcel.writeString(overlapH);
        parcel.writeString(overlapW);
        parcel.writeString(focalLength);
        parcel.writeString(sensorW);
        parcel.writeString(sensorH);
        parcel.writeString(margin);
        parcel.writeString(ImagePath);
        parcel.writeInt(stopWhenLost);
    }
}
